package com.alan.edu.mybatis.io;

import java.io.InputStream;

/**
 * 处理相关的IO操作
 *
 * @author alan
 * @date 2020-08-31 23:29:28
 */
public class Resources {

    /**
     * 根据配置文件的路径，将配置文件加载成字节输入流，存储在内存中
     *
     * @param path
     * @return
     */
    public static InputStream getResourceAsSteam(String path) {
        InputStream resourceAsStream = Resources.class.getClassLoader().getResourceAsStream(path);
        return resourceAsStream;
    }

}
